package com.smedi.ismedi.inmail.core.domain.repository;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.Announcement;
import com.smedi.ismedi.inmail.core.domain.aggregatemodel.announcement.AttachmentKeyAndTime;
import com.smedi.ismedi.inmail.core.domain.dto.AnnouncementQuery;
import com.smedi.ismedi.inmail.core.domain.dto.DownloadFileToZip;

import java.util.List;

/**
 * 基础信息仓库
 *
 * @author jiangqinxuan
 * @date 2021/07/27
 */
public interface AnnouncementRepository {

    /**
     * 公告的插入
     *
     * @param announcement 通知公告
     * @return Announcement
     */
    Announcement doSave(Announcement announcement);

    /**
     * 公告 获取 单一
     *
     * @param announcementQuery 通知公告查询
     * @return Announcement
     */
    Announcement getAnnouncementOne(AnnouncementQuery announcementQuery);

    /**
     * 删除
     *
     * @param announcementQuery 通知公告查询
     * @return Announcement
     */
    void deleteAnnouncement(AnnouncementQuery announcementQuery);

    /**
     * 公告 获取 列表
     *
     * @param announcementQuery 通知公告查询
     * @return Announcement
     */
    List<Announcement> getAnnouncementList(AnnouncementQuery announcementQuery);

    /**
     * 公告 获取 列表
     *
     * @param announcementQuery 通知公告查询
     * @return Announcement
     */
    Page<Announcement> getAnnouncementPage(AnnouncementQuery announcementQuery);

    /**
     * 查询需要下载附件列表
     * @param downloadFileToZip 下载条件
     * @return List<AttachmentKeyAndTime>
     */
    List<AttachmentKeyAndTime> getAttachmentKeyList(DownloadFileToZip downloadFileToZip);
}
